;var module = angular.module('CtrlsContent');
module.controller('TongguanDetailCtrl',['$scope','$stateParams','api_other',function($scope,$stateParams,api_other){
	$scope.detailM = [];
	$scope.currPrice = 0;
	$scope.event = {
		get:function(bookId){
			var obj  = {
				cat_id:localStorage.catId,
				book_id:bookId
			};
			var promise = api_other.bookDetail(obj);
			promise.success(function(data){
				if(data.returnCode == 0){
					$scope.detailM = data.returnData[0];
					$scope.currPrice = $scope.detailM.price;
					localStorage.goods_id = bookId;
					localStorage.price = $scope.detailM.price;
					localStorage.share_price = $scope.detailM.share_price;
					localStorage.IsShare = localStorage.IsShare || 1;
					document.getElementById("about").innerHTML =$scope.detailM.about;
				}
			})
		}
	};
	$scope.event.get($stateParams.id);
}]);